<html>
<head>
	<title>geoExtension Options</title>
	<link rel="stylesheet" href="geoExtension.css" type="text/css" media="screen">
<script type="text/javascript" src="geoExtension.js"></script>
<script type="text/javascript">

function save_options() {
/*
  var zoom_edit = document.getElementById("zoom");
  localStorage["zoom"] = zoom_edit.value;

  // Update status to let user know options were saved.
  var status = document.getElementById("status");
  status.innerHTML = "Options Saved.";
  setTimeout(function() {
    status.innerHTML = "";
  }, 750);
  */
}

// Restores select box state to saved value from localStorage.
function restore_options() {  
  
  var tbody = document.getElementById("tbody");
  
  for (var service in services) {
		
		var tr = document.createElement("tr");
		
		var td_check = document.createElement("td");
		var input = document.createElement("input");
		input.type = 'checkbox';
		if (services[service].enable) input.checked='checked'; 
		td_check.appendChild(input);
		tr.appendChild(td_check);
		
		var td_service = document.createElement("td");		
		var text = document.createTextNode(service);
		td_service.appendChild(text);
		tr.appendChild(td_service);
		
		var td_zoom = document.createElement("td");		
		var input = document.createElement("select");
		
		for (var i=services[service].zoom_mini;i<=services[service].zoom_maxi;i++) {
			var option = document.createElement("option");	
			var text = document.createTextNode(i);
			if (services[service].zoom==i) option.selected = 'selected';
			option.appendChild(text);			
			input.appendChild(option);
		}
		
		td_zoom.appendChild(input);
		tr.appendChild(td_zoom);
		
		tbody.appendChild(tr); 
	
	}

}
</script>
</head>
<body onload="restore_options()">

<table>
<thead>
<tr><th></th><th>Service</th><th>Zoom</th></tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
<br>
<!--<button onclick="save_options()">Save</button>-->

</body>
</html>